package com.example.demo.domain;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import lombok.Data;

/**
 * <a href="https://blog.csdn.net/zhaoyahui_666/article/details/78688688">spring-boot集成elasticsearch并实现简单的增删改查</a>
 * Created by wengjunjie on 2018/3/29.
 */
@Document(indexName = "zeusmedia", type = "article_v1", shards = 1, replicas = 0, refreshInterval = "-1")
@Data
public class EsArticle {

    @Id
    private String id;
    @Field
    private String title;
    @Field
    private String keywords;
    /**
     * 文章栏目标签
     */
    @Field
    private String article_tag;
    @Field
    private String desc;
    @Field
    private String author;
    @Field
    private Date create_time;

}
